import yagmail

def send(file):
    # mail=yagmail.SMTP(user='2440154941@qq.com',password='pdadhqjvrtduebcj',host='smtp.qq.com')
    # mail.send(to='2440154941@qq.com',subject='月考报告邮件',contents="请接收报告",attachments=file)
    mail=yagmail.SMTP(user="2440154941@qq.com",password="pdadhqjvrtduebcj",host="smtp.qq.com")
    mail.send(to="2440154941@qq.com",subject="月考报告邮件",contents="查看邮件",attachments=file)